import {defHttp} from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";

const { createConfirm } = useMessage();

enum Api {
  list = '/base/basStockCloseAccount/list',
  cancelMonthlySettlement='/base/basStockCloseAccount/cancelMonthlySettlement',
  monthlySettlement='/base/basStockCloseAccount/monthlySettlement'
}
/**
 * 列表接口
 * @param params
 */
export const list = (params) =>
  defHttp.get({url: Api.list, params});

/**
 * 库存关账-月结
 */
export const monthlySettlement = (params,handleSuccess) => {
  return defHttp.post({url: Api.monthlySettlement, params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}
/**
 * 库存关账-取消月结
 */
 export const cancelMonthlySettlement = (params,handleSuccess) => {
  return defHttp.post({url: Api.cancelMonthlySettlement, params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}
